package com.rabbit.validate.phone;

import com.rabbit.validate.phone.PhoneValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 校验手机号格式
 *
 * @author pujing
 * @since 2020/7/24 16:23
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PhoneValidator.class)
@Documented
@Inherited
public @interface Phone {

    /**
     * 提示
     */
    String message() default "手机号码格式不正确";

    /**
     * 分组
     */
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
